inherited fmClients: TfmClients
  Left = 452
  Top = 175
  Width = 843
  Height = 800
  Caption = #1047#1072#1074#1077#1076#1077#1085#1080#1077' '#1083#1102#1076#1077#1081
  Constraints.MinHeight = 800
  Constraints.MinWidth = 843
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel [0]
    Left = 0
    Top = 78
    Width = 827
    Height = 13
    Align = alTop
    Caption = #1057#1090#1088#1086#1082#1072' '#1087#1086#1080#1089#1082#1072
  end
  inherited sbBottom: TStatusBar
    Top = 735
    Width = 827
  end
  inherited Panel1: TPanel
    Width = 827
    Height = 41
    Visible = False
    inherited BitBtn1: TBitBtn
      Left = 659
    end
    inherited BitBtn2: TBitBtn
      Left = 739
    end
  end
  object tbTop: TToolBar [3]
    Left = 0
    Top = 41
    Width = 827
    Height = 37
    AutoSize = True
    BorderWidth = 2
    ButtonHeight = 25
    Images = DMInv.ilActive
    TabOrder = 2
    Transparent = True
    object tbInsert: TToolButton
      Left = 0
      Top = 2
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100
      ImageIndex = 30
      ParentShowHint = False
      ShowHint = True
      OnClick = tbInsertClick
    end
    object tbDelete: TToolButton
      Left = 23
      Top = 2
      Hint = #1059#1076#1072#1083#1080#1090#1100
      ImageIndex = 29
      ParentShowHint = False
      ShowHint = True
      Visible = False
      OnClick = tbDeleteClick
    end
    object tbEdit: TToolButton
      Left = 46
      Top = 2
      Hint = #1048#1079#1084#1077#1085#1080#1090#1100
      ImageIndex = 2
      ParentShowHint = False
      ShowHint = True
      OnClick = tbEditClick
    end
    object ToolButton3: TToolButton
      Left = 69
      Top = 2
      Width = 8
      Caption = 'ToolButton3'
      ImageIndex = 2
      Style = tbsSeparator
    end
    object tbRefresh: TToolButton
      Left = 77
      Top = 2
      Caption = #1054#1073#1085#1086#1074#1080#1090#1100' '#1076#1072#1085#1085#1099#1077
      ImageIndex = 8
      ParentShowHint = False
      ShowHint = True
      OnClick = tbRefreshClick
    end
    object ToolButton2: TToolButton
      Left = 100
      Top = 2
      Width = 8
      Caption = 'ToolButton2'
      ImageIndex = 3
      Style = tbsSeparator
    end
    object cbPosition: TComboBox
      Left = 108
      Top = 2
      Width = 233
      Height = 21
      AutoDropDown = True
      Style = csDropDownList
      DropDownCount = 15
      ItemHeight = 13
      TabOrder = 0
      Visible = False
      OnChange = cbPositionChange
    end
    object ToolButton1: TToolButton
      Left = 341
      Top = 2
      Width = 8
      Caption = 'ToolButton1'
      ImageIndex = 4
      Style = tbsSeparator
    end
    object cbFilter: TCheckBox
      Left = 349
      Top = 2
      Width = 76
      Height = 25
      Caption = #1060#1080#1083#1100#1090#1088#1099
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      TabOrder = 1
      Visible = False
      OnClick = cbFilterClick
    end
  end
  object dbgClients: TcxGrid [4]
    Left = 0
    Top = 126
    Width = 827
    Height = 609
    Align = alClient
    TabOrder = 3
    LookAndFeel.Kind = lfStandard
    object dbgClientsDBTableView1: TcxGridDBTableView
      OnKeyDown = dbgClientsDBTableView1KeyDown
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.First.Visible = True
      NavigatorButtons.PriorPage.Visible = True
      NavigatorButtons.Prior.Visible = True
      NavigatorButtons.Next.Visible = True
      NavigatorButtons.NextPage.Visible = True
      NavigatorButtons.Last.Visible = True
      NavigatorButtons.Insert.Visible = False
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Delete.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = False
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      OnCellDblClick = dbgClientsDBTableView1CellDblClick
      DataController.DataSource = dlgDS
      DataController.Summary.DefaultGroupSummaryItems = <
        item
          Kind = skCount
          Position = spFooter
          FieldName = 'PLASTNAME'
        end>
      DataController.Summary.FooterSummaryItems = <
        item
          Kind = skCount
          FieldName = 'FIO'
          Column = dbgClientsDBTableView1PP
        end>
      DataController.Summary.SummaryGroups = <>
      DataController.Summary.Options = [soNullIgnore]
      FilterRow.InfoText = #1065#1077#1083#1082#1085#1080#1090#1077' '#1079#1076#1077#1089#1100' '#1076#1083#1103' '#1089#1086#1079#1076#1072#1085#1080#1103' '#1092#1080#1083#1100#1090#1088#1072
      NewItemRow.InfoText = #1065#1105#1083#1082#1085#1080#1090#1077' '#1079#1076#1077#1089#1100' '#1076#1083#1103' '#1076#1086#1073#1072#1074#1083#1077#1085#1080#1103' '#1085#1086#1074#1086#1081' '#1089#1090#1088#1086#1082#1080
      OptionsBehavior.CellHints = True
      OptionsBehavior.ImmediateEditor = False
      OptionsBehavior.IncSearch = True
      OptionsBehavior.IncSearchItem = dbgClientsDBTableView1PP
      OptionsCustomize.ColumnFiltering = False
      OptionsCustomize.ColumnGrouping = False
      OptionsData.Deleting = False
      OptionsData.Editing = False
      OptionsData.Inserting = False
      OptionsSelection.CellSelect = False
      OptionsSelection.HideFocusRectOnExit = False
      OptionsSelection.InvertSelect = False
      OptionsSelection.UnselectFocusedRecordOnExit = False
      OptionsView.NavigatorOffset = 10
      OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
      OptionsView.ColumnAutoWidth = True
      OptionsView.DataRowHeight = 24
      OptionsView.ExpandButtonsForEmptyDetails = False
      OptionsView.Footer = True
      OptionsView.GroupByBox = False
      OptionsView.Indicator = True
      Preview.Visible = True
      Styles.Content = DMInv.cxData
      Styles.IncSearch = DMInv.cxKrasniyText
      Styles.Selection = DMInv.cxJoltiyFon
      Styles.Header = DMInv.cxSiniyText
      object dbgClientsDBTableView1PID: TcxGridDBColumn
        DataBinding.FieldName = 'PID'
        Width = 53
      end
      object dbgClientsDBTableView1PP: TcxGridDBColumn
        DataBinding.FieldName = 'PP'
        Width = 266
      end
      object dbgClientsDBTableView1PDATEBIRTH: TcxGridDBColumn
        DataBinding.FieldName = 'PDATEBIRTH'
        Options.Editing = False
        Width = 99
      end
      object dbgClientsDBTableView1SDNAME: TcxGridDBColumn
        Caption = #1057#1090#1072#1090#1091#1089
        DataBinding.FieldName = 'SDNAME'
        Width = 146
      end
      object dbgClientsDBTableView1PLASTNAME_ENGLISH: TcxGridDBColumn
        Caption = 'LASTNAME'
        DataBinding.FieldName = 'PLASTNAME_ENGLISH'
        Width = 129
      end
      object dbgClientsDBTableView1PNAME_ENGLISH: TcxGridDBColumn
        Caption = 'NAME'
        DataBinding.FieldName = 'PNAME_ENGLISH'
        Width = 118
      end
    end
    object dbgClientsLevel1: TcxGridLevel
      GridView = dbgClientsDBTableView1
    end
  end
  object Panel2: TPanel [5]
    Left = 0
    Top = 91
    Width = 827
    Height = 35
    Align = alTop
    TabOrder = 4
    object Edit1: TEdit
      Left = 5
      Top = 4
      Width = 316
      Height = 27
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      TabOrder = 0
      OnChange = Edit1Change
      OnClick = Edit1Click
    end
  end
  inherited dlgDS: TDataSource
    DataSet = qPeople
    Left = 152
    Top = 82
  end
  object qPeople: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    BeforeOpen = qPeopleBeforeOpen
    CachedUpdates = True
    SQL.Strings = (
      
        'SELECT P.*, (COALESCE(P.PLASTNAME, '#39' '#39')||'#39' '#39'||COALESCE(P.PNAME,'#39 +
        ' '#39')||'#39' '#39'||COALESCE(P.PPATRONYMIC,'#39' '#39')) AS PP,'
      
        '        (DATEDIFF( YEAR FROM P.PDATEBIRTH to CURRENT_DATE)||'#39' ai' +
        'aa(eao) e '#39'||'
      '     (DATEDIFF( MONTH FROM P.PDATEBIRTH to CURRENT_DATE) -'
      
        '     (DATEDIFF( YEAR FROM P.PDATEBIRTH to CURRENT_DATE) * 12)) |' +
        '|'#39' ian.'#39') AS vozrast,'
      
        '     (P.PLASTNAME||'#39' '#39'||COALESCE(SUBSTRING(P.PNAME FROM 1 FOR 1 ' +
        ')||'#39'. '#39', '#39' '#39')||'
      
        '     COALESCE(SUBSTRING(P.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39')) A' +
        'S fio, PS.PSTEP,'
      '     SD.SDNAME'
      'FROM PEOPLE P'
      'LEFT OUTER JOIN P_STEPACT PS ON PS.PID = P.PID'
      'LEFT OUTER JOIN P_STATUS PSS ON PSS.PID = P.PID'
      'LEFT OUTER JOIN SYS_DIC SD ON SD.SDID = PSS.SDID'
      'where P.PISDELETE is null'
      'ORDER BY 15')
    UpdateObject = quPeople
    Left = 184
    Top = 81
    object qPeoplePID: TIntegerField
      DisplayLabel = #1053#1086#1084#1077#1088
      FieldName = 'PID'
      Origin = '"PEOPLE"."PID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qPeoplePLASTNAME: TIBStringField
      DisplayLabel = #1060#1072#1084#1080#1083#1080#1103
      FieldName = 'PLASTNAME'
      Origin = '"PEOPLE"."PLASTNAME"'
      Size = 255
    end
    object qPeoplePNAME: TIBStringField
      DisplayLabel = #1048#1084#1103
      FieldName = 'PNAME'
      Origin = '"PEOPLE"."PNAME"'
      Size = 255
    end
    object qPeoplePPATRONYMIC: TIBStringField
      DisplayLabel = #1054#1090#1095#1077#1089#1090#1074#1086
      FieldName = 'PPATRONYMIC'
      Origin = '"PEOPLE"."PPATRONYMIC"'
      Size = 255
    end
    object qPeoplePDATEBIRTH: TDateField
      DisplayLabel = #1044#1072#1090#1072' '#1088#1086#1078#1076#1077#1085#1080#1103
      FieldName = 'PDATEBIRTH'
      Origin = '"PEOPLE"."PDATEBIRTH"'
    end
    object qPeoplePNOTE: TIBStringField
      DisplayLabel = #1044#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1086
      DisplayWidth = 50
      FieldName = 'PNOTE'
      Origin = '"PEOPLE"."PNOTE"'
      Size = 2048
    end
    object qPeoplePTIMEENTER: TDateTimeField
      FieldName = 'PTIMEENTER'
      Origin = '"PEOPLE"."PTIMEENTER"'
    end
    object qPeoplePTIMEEDIT: TDateTimeField
      FieldName = 'PTIMEEDIT'
      Origin = '"PEOPLE"."PTIMEEDIT"'
    end
    object qPeoplePUSERENTER: TIBStringField
      FieldName = 'PUSERENTER'
      Origin = '"PEOPLE"."PUSERENTER"'
      Size = 40
    end
    object qPeoplePUSEREDIT: TIBStringField
      FieldName = 'PUSEREDIT'
      Origin = '"PEOPLE"."PUSEREDIT"'
      Size = 40
    end
    object qPeoplePISDELETE: TIntegerField
      FieldName = 'PISDELETE'
      Origin = '"PEOPLE"."PISDELETE"'
    end
    object qPeoplePP: TIBStringField
      DisplayLabel = #1060#1048#1054
      FieldName = 'PP'
      ProviderFlags = []
      Size = 767
    end
    object qPeopleVOZRAST: TIBStringField
      DisplayLabel = #1042#1086#1079#1088#1072#1089#1090
      FieldName = 'VOZRAST'
      ProviderFlags = []
      Size = 60
    end
    object qPeopleFIO: TIBStringField
      FieldName = 'FIO'
      ProviderFlags = []
      Size = 769
    end
    object qPeoplePSEX: TIntegerField
      FieldName = 'PSEX'
      Origin = '"PEOPLE"."PSEX"'
    end
    object qPeoplePSTEP: TIntegerField
      DisplayLabel = #1040#1082#1090#1091#1072#1083#1100#1085#1086#1089#1090#1100
      FieldName = 'PSTEP'
      Origin = '"P_STEPACT"."PSTEP"'
    end
    object qPeopleSDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qPeoplePNAME_ENGLISH: TIBStringField
      FieldName = 'PNAME_ENGLISH'
      Origin = '"PEOPLE"."PNAME_ENGLISH"'
      Size = 255
    end
    object qPeoplePLASTNAME_ENGLISH: TIBStringField
      FieldName = 'PLASTNAME_ENGLISH'
      Origin = '"PEOPLE"."PLASTNAME_ENGLISH"'
      Size = 255
    end
  end
  object qPosition: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterOpen = qPositionAfterOpen
    SQL.Strings = (
      'SELECT -1 SDID, '#39' '#1042#1089#1077' '#1087#1086#1079#1080#1094#1080#1080#39' SDNAME'
      '  FROM SYS_DIC SD'
      'UNION'
      'SELECT SD.SDID, SD.SDNAME'
      '  FROM SYS_DIC SD'
      ' WHERE SD.SDPARID = 1'
      ' ORDER BY 2')
    Left = 512
    Top = 50
    object qPositionSDID: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object qPositionSDNAME: TIBStringField
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 255
    end
  end
  object quPeople: TIBUpdateSQL
    RefreshSQL.Strings = (
      'null;')
    InsertSQL.Strings = (
      '')
    DeleteSQL.Strings = (
      'update PEOPLE'
      'set'
      ''
      '  PISDELETE = 1'
      ''
      'where'
      '  PID = :OLD_PID'
      '')
    Left = 216
    Top = 82
  end
end
